
<mat-radio-group [(ngModel)]="type" (change)="changeType()">

  <mat-radio-button [value]="TYPE.REFUSE">
    <ng-container i18n="services.form.label.proxyPolicy.refuse">
      {{ messages.services_form_label_proxyPolicy_refuse }}
    </ng-container>
  </mat-radio-button>

  <mat-radio-button  [value]="TYPE.REGEX">
    <ng-container i18n="services.form.label.proxyPolicy.regex">
      {{ messages.services_form_label_proxyPolicy_regex }}
    </ng-container>
  </mat-radio-button>

</mat-radio-group>

<ng-container *ngIf="type == TYPE.REGEX">
  <app-input field="pattern" [change]="policy" [orig]="original">
    <mat-form-field class="textInput">
      <mat-placeholder i18n-placeholder="services.form.label.proxyPolicy.regex">
        {{ messages.services_form_label_proxyPolicy_regex }}
      </mat-placeholder>
      <input matInput required [(ngModel)]="policy.pattern">
      <mat-hint align="end">
        <app-hint></app-hint>
      </mat-hint>
    </mat-form-field>
    <mat-icon appHelp
             i18n-matTooltip="services.form.tooltip.proxyPolicy.regex"
             [matTooltip]="messages.services_form_tooltip_proxyPolicy_regex">
    </mat-icon>
  </app-input>
</ng-container>
